home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn WWW 1999 June
/
magazyn_www_no26_06_1999.iso
/
prog
/
mac
/
nihimage
/
nihimage.hqx
/
NIH Image 1.61
/
Macros
/
ROI Macros
< prev
next >
Wrap
Text File
|
1994-06-22
|
650b
|
36 lines
macro 'Gray level wand tool [W]';
var
x,y:integer;
begin
Requiresversion(1.55);
KillROI;
repeat
SetCursor('arrow');
showmessage('Click on the image');
until button;
GetMouse(x,y);
AutoThreshold;
AutoOutline(x,y);
SetThreshold(-1);
end;
macro 'Fill Selection, Erase Background';
{Fills selection to black and sets everything else white.}
var
left,top,width,height:integer;
begin
GetRoi(left,top,width,height);
if width=0 then begin
PutMessage('Selection required.');
exit;
end;
SetForeground(255); {Black}
SetBackground(0); {White}
SelectAll;
Clear;
RestoreRoi;
Fill;
KillRoi;
end;